<!DOCTYPE html>  
<html>

<head>
<link rel="stylesheet" type="text/css" href="/incofarming/Views/css/mainpage.css" />
<link href="/incofarming/Views/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>

<body>



<?php

$host="localhost"; 
$username="root"; 
$password=""; 
mysql_connect("$host", "$username", "$password")or die("cannot connect server "); 
mysql_select_db('Incofarming_db')or die("cannot select DB");

$prov_query = "SELECT * FROM provinsi";
$prov_result = mysql_query($prov_query);

?>
<div id="container">

	<div id="header">
		
		<div id="logo">
			<p>&nbsp;</p>
			<p>INCOFARMING </p>
		</div>
		
		<div id="tab">
			<ul class="nav nav-tabs">
  				<li>
    				<a href="#">Home</a>
 				</li>
  				<li class="active"><a href="#">Registrasi Koperasi</a>
                </li>
  			</ul>
		</div>
	
    </div>

<form class="form-horizontal" method="POST" action="../Functions/insertkoperasi.php">  
        <fieldset>  
          <div class="control-group">  
            <label class="control-label" for="input01">Username</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="usename">   
            </div>
          </div>  
            <div class="control-group">  
            <label class="control-label" for="input01">Password</label>  
            <div class="controls">  
              <input type="password" class="input-xlarge" id="input01" name="pass">   
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="input01">Nama Koperasi</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="nama">   
            </div>  
          </div>
		  
		  <div class="control-group">  
            <label class="control-label" for="input01">Alamat Koperasi</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="alamat">   
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="select01">Provinsi</label>  
            <div class="controls">  
            <select onChange id="select01" name="provinsi"> 
            <?php
				while($row = mysql_fetch_array($prov_result)){
			?>
            	<option value="<?php echo $row['IDPROPINSI']; ?>"><?php echo $row['NAMAPROPINSI']; ?> </option>
            <?php } ?>
              </select>  
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="select01">Kota</label>  
            <div class="controls">  
              <select id="select01" name="kota">  
                <option>Jakarta</option>  
                <option>Surabaya</option>  
              </select>  
            </div>  
          </div>
          <div class="control-group">  
            <label class="control-label" for="input01">No Kantor</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="notelp">   
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="input01">No Fax</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="nofax">   
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="input01">Tanggal Pendirian</label>  
            <div class="controls">  
              <input type="date" class="input-xlarge" id="input01" name="tanggal">   
            </div>  
          </div>
<!--		  <div class="control-group">  
            <label class="control-label" for="fileInput">Foto Lokasi</label>  
            <div class="controls">  
              <input class="input-file" id="fileInput" type="" name="foto">  
            </div>  
          </div> --> 
          <div class="control-group">  
            <label class="control-label" for="textarea">Informasi Koperasi</label>  
            <div class="controls">  
              <textarea class="input-xlarge" id="textarea" rows="3" name="info"></textarea>  
            </div>  
          </div>  
          <div class="form-actions">  
            <button type="submit" class="btn btn-primary">Simpan</button>  
            <button class="btn">Batal</button>  
          </div>  
        </fieldset>  
</form>  
<?php
echo mysql_num_rows($kota_result);
while($row = mysql_fetch_array($kota_result)){
	echo $row["NAMAPROPINSI"];
	echo "test \n";
}


?>
</div>

<script src="js/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-carousel.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="js/dropdown.js"></script>

	
</body>

</html>